﻿using DICOM_PROJECT.DAL;
using DICOM_PROJECT.DAL.Security;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DICOM_PROJECT.Controllers
{
    public class BaseController : Controller
    {
        protected HospitalContext db = new HospitalContext();
        protected virtual new CustomPrincipal User
        {
            get { return HttpContext.User as CustomPrincipal; }
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                db.Dispose();
            }
            base.Dispose(disposing);
        }
    }
}